class Queue:
    def __init__(self):
        self.data = [0] * 10000
        self.head = 0
        self.tail = -1

    def push(self, e):
        self.tail += 1
        self.data[self.tail] = e

    def poll(self):
        self.head += 1

    def front(self):
        return self.data[self.head]

    def __str__(self):
        return str(self.data[self.head:self.tail + 1])

    def empty(self):
        return self.head > self.tail

    def size(self):
        return self.tail - self.head + 1


Q = Queue()
for i in range(10):
    Q.push(i)
while not Q.empty():
    print(Q)
    Q.poll()
